﻿@using AngularTest2.Models;
@model EventModel
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>
<script src="~/Scripts/Events/eventcontroller.js"></script>
<script type="text/javascript">
    eventModule.factory("InitialLoadService", function () {
        return {
            talks: @Html.Raw(@Model.Talks)
            };
    });
</script>
<div class="container">
    <h2>Talk Details</h2>
    <div class="row" ng-controller="eventController">
        <table class="table table-condensed table-hover">
            <tr>
                <th>Id</th>
                <th>Name</th>
                <th>Speaker</th>
            </tr>
            <tr ng-repeat="talk in talks">
                <td>{{talk.id}}</td>
                <td>{{talk.name}}</td>
                <td>{{talk.speaker}}</td>
            </tr>
        </table>
    </div>

</div>